package hcn.protocol.brandnew.feiyong.shoufei;

import com.fasterxml.jackson.annotation.JsonFormat;
import ctd.util.xml.jaxb.DateTimeAdapter;
import java.util.Date;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import lombok.Data;


/**
 * 门诊已支付信息查询-响应消息(成功) - ODS_04030004_SUC
 *
 * @author enjoyLife
 */
@Data
@XmlRootElement(name = "Data")
@XmlAccessorType(XmlAccessType.FIELD)
public class GetPayedListResponse {

    /**
     * 已支付信息集合
     */
    @XmlElementWrapper(name = "Records")
    @XmlElement(name = "Record")
    private List<Record> records;

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class MedicalInsuranceCost {

        /**
         * 医保支付方式
         */
        @XmlElement(name = "MedicalInsuranceCostTypeCode")
        private Byte medicalInsuranceCostTypeCode;
        /**
         * 医保支付金额
         */
        @XmlElement(name = "MedicalInsuranceCost")
        private String medicalInsuranceCost;
        /**
         * 打印状态
         */
        @XmlElement(name = "InvoiceStatus")
        private String invoiceStatus;
        /**
         * 费用日期
         */
        @XmlElement(name = "CostDate")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date costDate;
        /**
         * 检验条码号
         */
        @XmlElement(name = "BarcodeNo")
        private String barcodeNo;
        /**
         * 操作者姓名
         */
        @XmlElement(name = "OperatorName")
        private String operatorName;
        /**
         * 操作者工号
         */
        @XmlElement(name = "OperatorId")
        private String operatorId;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class CostList {

        /**
         * 费用项目代码
         */
        @XmlElement(name = "CostId")
        private String costId;
        /**
         * 费用项目名称
         */
        @XmlElement(name = "CostName")
        private String costName;
        /**
         * 费用项目分类代码
         */
        @XmlElement(name = "CostItemId")
        private String costItemId;
        /**
         * 费用归并名称
         */
        @XmlElement(name = "CostItemName")
        private String costItemName;
        /**
         * 执行科室代码
         */
        @XmlElement(name = "ExecutiveDepartment")
        private String executiveDepartment;
        /**
         * 执行状态
         */
        @XmlElement(name = "ExecuteStatus")
        private Integer executeStatus;
        /**
         * 备注
         */
        @XmlElement(name = "Remark")
        private String remark;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class InvoiceList {
        @XmlElement(name = "PayStatus")
        private String payStatus;
        /**
         * 费用日期
         */
        @XmlElement(name = "CostDate")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date costDate;
        /**
         * 打印状态
         */
        @XmlElement(name = "InvoiceStatus")
        private String invoiceStatus;
       /**
           * 检验条码号
         */
        @XmlElement(name = "BarcodeNo")
        private String barcodeNo;
        /**
         * 就诊医疗机构组织机构代码
         */
        @XmlElement(name = "VisitOrganization")
        private String visitOrganization;
        /**
         * 就诊机构名称
         */
        @XmlElement(name = "VisitOrganizationName")
        private String visitOrganizationName;
        /**
         * 发票号码
         */
        @XmlElement(name = "InvoiceCode")
        private String invoiceCode;
        /**
         * 结算日期时间
         */
        @XmlElement(name = "SettleDateTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date settleDateTime;
        /**
         * 就诊日期时间
         */
        @XmlElement(name = "VisitDateTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date visitDateTime;
        /**
         * 预结算标识
         */
        @XmlElement(name = "PaymentNumber")
        private String paymentNumber;
        /**
         * 总计金额
         */
        @XmlElement(name = "TotalCost")
        private String totalCost;
        /**
         * 结算明细说明
         */
        @XmlElement(name = "ExtraFeeDesc")
        private String extraFeeDesc;
        /**
         * 现金金额
         */
        @XmlElement(name = "PayAmount")
        private String payAmount;
        /**
         * 医保报销总额
         */
        @XmlElement(name = "MedicalExpensesCost")
        private String medicalExpensesCost;
        /**
         * 医保支付方式集合
         */
        @XmlElementWrapper(name = "MedicalInsuranceCosts")
        @XmlElement(name = "MedicalInsuranceCost")
        private List<MedicalInsuranceCost> medicalInsuranceCosts;
        /**
         * 收费项目集合
         */
        @XmlElementWrapper(name = "CostLists")
        @XmlElement(name = "CostList")
        private List<CostList> costLists;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Record {

        /**
         * 患者ID
         */
        @XmlElement(name = "SourcePatientId")
        private String sourcePatientId;
        /**
         * 诊疗卡类型
         */
        @XmlElement(name = "MedicalCardType")
        private String medicalCardType;
        /**
         * 患者卡号
         */
        @XmlElement(name = "MedicalCardID")
        private String medicalCardID;
        /**
         * 年龄（岁）
         */
        @XmlElement(name = "Age")
        private Short age;
        /**
         * 患者姓名
         */
        @XmlElement(name = "Name")
        private String name;
        /**
         * 性别代码
         */
        @XmlElement(name = "Sex")
        private String sex;
        /**
         * 发票列表
         */
        @XmlElementWrapper(name = "InvoiceLists")
        @XmlElement(name = "InvoiceList")
        private List<InvoiceList> invoiceLists;
    }

}
